﻿<script type="text/javascript" src="<?php echo base_url();?>js/jquery-1.11.0.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			 $(".link").click(function(event) {
                var href = $(this).attr('href');
                $('.content').fadeOut("fast").hide().load( href ).fadeIn('fast');
                event.preventDefault();
            });
		 });
	</script>
<a class="link" href="<?php echo base_url();?>index.php/admin/addUser">เพิ่มข้อมูลผู้ใช้</a>
<table width="314" border="1" align="center">
  <tbody>
    <tr>
      <th width="44">ชื่อผู้ใช้</th>
      <th width="103">ชื่อ-นามสกุล</th>
      <th width="31">สถานะ</th>
      <th width="31">ลบ</th>
    </tr>
    <?php foreach($user as $row) {?>
 <tr>
      <td width="44"><?php echo $row['username']; ?></td>
      <td width="103"><?php echo $row['name'].' '.$row['lastname']; ?></td>
      <td width="31"><?php echo $row['status']; ?></td>
      <td width="31"><a href="<?php echo base_url();?>index.php/admin/deleteDataUser/<?php echo $row['id']; ?>">ลบ</a></td>
    </tr>
    <?php }?>
  </tbody>
</table>